from sqlalchemy.orm import Session

from crud import SysDictAdminCrud
from schema.ParamSchema import SysDictInfo, SysDictDetailInfo
from schema.QuerySchema import QueryBase


class SysDictAdminController:
    @staticmethod
    def add_sys_dict(sysDictInfo: SysDictInfo, db: Session):
        return SysDictAdminCrud.add_sys_dict(sysDictInfo, db)

    @staticmethod
    def mod_sys_dict(sysDictInfo: SysDictInfo, db: Session):
        return SysDictAdminCrud.mod_sys_dict(sysDictInfo, db)

    @staticmethod
    def query_sys_dict_by_id(sys_dict_id: int, db: Session):
        return SysDictAdminCrud.query_sys_dict_by_id(sys_dict_id, db)

    @staticmethod
    def query_sys_dict_by_page(query_base: QueryBase, db: Session):
        return SysDictAdminCrud.query_sys_dict_by_page(query_base, db)

    @staticmethod
    def query_sys_dict_all_detail(db: Session):
        return SysDictAdminCrud.query_sys_dict_all_detail(db)

    @staticmethod
    def delete_sys_dict(sys_dict_id: int, db: Session):
        return SysDictAdminCrud.delete_sys_dict(sys_dict_id, db)

    @staticmethod
    def add_sys_dict_detail(sysDictDetailInfo: SysDictDetailInfo, db: Session):
        return SysDictAdminCrud.add_sys_dict_detail(sysDictDetailInfo, db)

    @staticmethod
    def mod_sys_dict_detail(sysDictDetailInfo: SysDictDetailInfo, db: Session):
        return SysDictAdminCrud.mod_sys_dict_detail(sysDictDetailInfo, db)

    @staticmethod
    def query_sys_dict_detail_by_id(sys_dict_id: int, db: Session):
        return SysDictAdminCrud.query_sys_dict_detail_by_id(sys_dict_id, db)

    @staticmethod
    def delete_sys_dict_detail(sysDictDetailInfo: SysDictDetailInfo, db: Session):
        return SysDictAdminCrud.delete_sys_dict_detail(sysDictDetailInfo, db)
